﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="WsDef.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Sys.Help.WsDef" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    var DEF = [
        ["ws/_Area.aspx", "获取区域信息", [
            ]
        ],
        ["ws/_Code.aspx", "获取系统代码", [
            ["t", "代码类型的KEY", true],
            ["act", "动作类型，list:获取列表", true]
            ]
        ],
        ["ws/_Dept.aspx", "获取部门数据", [
            ["rk", "节点的Key，指定从那个部门开始获取其子集", false]
            ]
        ],
        ["ws/_item.aspx", "输出Item的信息", [
            ["act","list:列表",true],
            ["ck","分类主键",true],
            ["q", "显示高级查询结果列表", false],
            ["qr", "显示高级查询结果报表", false],
            ["exp", "根据查询项导出CSV文件", false]
            ]
        ],
        ["ws/_FileAction.aspx", "文件操作", [
            ["model_name", "model的名字", true],
            ["model_key", "model的值", true],
            ["act", "动作类型，del：删除，list：列表，top：置顶", true],
            ["keys", "文件Key的逗号分割的拼合字符串", true],
            ["key", "是否保存登录状态，如果是1，true，checked则保存，act=top时检查此项", false]
            ]
        ],
        ["ws/_Login.aspx", "登录", [
            ["u", "用户名", true],
            ["p", "密码", true],
            ["cookie", "是否保存登录状态，如果是1，true，checked则保存", false],
            ["vc", "验证码，系统设置需要验证码时检查此项", false]
            ]
        ],
        ["ws/_Template.aspx", "获取模板", [
            ["id", "模板的ID", true]
            ]
        ],
        ["ws/_upload.aspx", "上传文件", [
            ["model_name", "model的名字", true],
            ["model_key", "model的值", true],
            ["failed_handler", "上传出错后调用的JS方法", false],
            ["succeed_handler", "上传出错后调用的JS方法", false]
            ]
        ],
        ["ws/_user.aspx", "输出用户信息", [
            ["mode", "rddl:列表", true],
            ["p", "1:过滤权级，只列出比操作者角色等级低的人", false]
            ]
        ],
        ["ws/_ValidateCodeImg.aspx", "输出验证码的图片", []
        ]
    ];
    function ShowWsDef(){
        var str = new Array();
        var idx = new Array();
        str.push('<table cellspacing="0" cellpadding="0" class="GridView">');
        for (var i = 0; i < DEF.length; i++) {
            idx.push('<div>'+(i+1)+'. <a href="Admin/Sys/Help/WsDef.aspx#idx' + i + '">' + DEF[i][0] + '</a></div>');
            str.push('<tr class="GridViewHeader">');
            str.push('<th colspan="3"><a name="idx' + i + '" id="idx' + i + '"></a><b><a href="Admin/Sys/Help/WsDef.aspx#" style="color:#aaaaaa">[TOP]</a></b>&nbsp;&nbsp;' + DEF[i][0] + '</th>');
            str.push('</tr>');
            str.push('<tr class="GridViewRow">');
            str.push('<td colspan="3" style="color:#00aa00"><b>说明：</b>' + DEF[i][1] + '</td>');
            str.push('</tr>');
            str.push('<tr class="GirdViewAlternatingRow">');
            str.push('<td>参数名</td>');
            str.push('<td>描述</td>');
            str.push('<td>必须</td>');
            str.push('</tr>');
            for(var j=0;j<DEF[i][2].length;j++){
                str.push('<tr class="GridViewRow">');
                str.push('<td>' + DEF[i][2][j][0] + '</td>');
                str.push('<td>' + DEF[i][2][j][1] + '</td>');
                str.push('<td>' + DEF[i][2][j][2] + '</td>');
                str.push('</tr>');
            }
        }
        str.push('</table>');
        $("#def_panel").innerHTML = str.join('');
        $("#def_index").innerHTML = idx.join('');
    };
    var PageOnLoad = function(){
        ShowWsDef();
    };
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
Webservice定义
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
<table cellpadding="0" cellspacing="0" width="100%" border="0">
    <tr>
        <td valign="top">
<fieldset style="width:360px">
    <legend>Web Service 索引</legend>
    <div id="def_index"></div>
</fieldset>
        </td>
        <td valign="top">
<fieldset style="width:600px">
    <legend>Web Service 参数说明</legend>
    <div id="def_panel"></div>
</fieldset>
        </td>
    </tr>
</table>
</asp:Content>
